The present invention relates to an apparatus and a method for generating a control program efficiently based on a plurality of partial programs.
Conventionally, a computer program for controlling various systems including an air-conditioning system (i.e., a control program) is known. The control program is executed for each device as a unit of control. An example device is a compressor, a fan or a louver included in an air-conditioning system. The control specification for a given device includes a plurality of partial specifications generated from different viewpoints, and a conflict exists between the partial specifications due to the difference in viewpoint.
In generating a control program, these conflicts are conventionally eliminated in the manner described below. Specifically, different partial specifications are generated for different viewpoints separately from each other, and the priority is determined among the partial specifications. In order to obviate the conflict between the partial specifications, the partial specifications are selected in the descending order of priority, and are integrally combined to generate a synthesized overall specification. On the basis of the integrated synthesized specification, a control program is generated. This work is performed manually by the operator.
A control specification for the compressor of the cooler, for example, is generated as follows:
(1) From the viewpoint of controllability (for achieving the shortest time until reaching a target temperature), a partial specification requiring the following output is generated.
TABLE 1 ______________________________________ Input Less than 0.5.degree. or more but 1.0.degree. (preset temperature- 0.5.degree. less than or room temperature) 1.0.degree. more Output value Hold 20 Hz 50 Hz (revolution previous frequency) output ______________________________________
(2) From the viewpoint of economy (elimination of wasteful running cost), a partial specification requiring an upper limit described below is generated.
TABLE 2 ______________________________________ Input value (regenerator temperature) Less than 2.0.degree. 2.0.degree. or more Output value (revolution temperature) 10 Hz or less 50 Hz or less ______________________________________
(3) From the viewpoint of durability (prevention of consumption of each component member of the cooler), a partial specification is generated requiring the output as described below.
TABLE 3 ______________________________________ Input value (outside air temperature) Less than 10.0.degree. 10.0.degree. or more Output value (revolution frequency) 30 Hz or more 0 Hz or more ______________________________________
The conventional technique for integrating these partial specifications may use the following-described four guides.
[Guide 1]
The condition of an environment parameter affecting the calculation of an output value is called an input condition. In the case where no conflict occurs between partial specifications for a given input, one output value satisfying all the partial specifications at the same time is selected and is used as an output associated with the particular condition.
[Guide 2]
In the case where a conflict occurs between partial specifications under a given input condition, a group of a maximum number of partial specifications is generated, each of which has an output value satisfying all the partial specifications selected in the descending order of priority. An output value satisfying all the partial specifications in the particular group at the same time is determined as an output associated with the particular condition.
[Guide 3]
In the case where there are a plurality of output values satisfying a group of non-conflicting partial specifications in Guide 2, that partial specification in conflict with the group of partial specifications which has the highest order of priority is selected. That output value satisfying the group of partial specifications which is most proximate to the output range due to the conflicting partial specification selected above is determined as an output.
Actually, however, in order to conduct the works of Guides 1 to 3 above efficiently, a specification is configured based on Guide 4 described below.
[Guide 4]
Each partial specification defines a different output value according to the range of the input value (input condition). Prior to application of each guide, therefore, possible combinations of input ranges are divided into different cases in a manner not to double one on another. In this dividing operation, each element making up an input condition is classified for different output values due to a partial specification, and all the combinations of the elements thus divided are generated. An appropriate one of the guides is applied to each case thus divided.
Explanation will be made about an example in which these four guides are applied to a combination of the partial specifications of the above-mentioned Tables 1 to 3 for the compressor. Assume that durability, economy and controllability of the compressor are lower in priority in that order in the partial specifications in Tables 1 to 3. First, the input conditions are classified as indicated in Guide 4. In this example, the input conditions for each partial specification are numerical values variable independently of each other. The partial specifications are thus divided into 3.times.2.times.2(=12) combinations. Among the combinations of the input conditions thus divided, explanation will be made about a case in which there occurs no conflict between the partial specifications and a case in which there occurs a conflict between the partial specifications.
As an example with no conflict between partial specifications, consider a situation where the following three conditions are met.
0.5.degree..ltoreq.(preset temperature--room temperature)&lt;1.0.degree.
Regenerator temperature.gtoreq.2.0.degree.
Outside air temperature.gtoreq.10.0.degree.
The range of the output value (revolution frequency) is determined as 20 Hz based on the partial specifications relating to the controllability, 50 Hz or less based on the partial specifications relating to economy, and 0 Hz or more based on the partial specifications relating to durability. FIG. 1 shows a numeric line representing the relation between these output values. In this case, there occurs no conflict between partial specifications. The output value 20 Hz satisfying the three partial specifications at the same time is selected as an output value associated with an integrated synthesized specification.
On the other hand, consider a situation where the following three conditions are met as an example with a conflict between partial specifications.
1.0.degree..ltoreq.(preset temperature - room temperature)
Regenerator temperature&lt;2.0.degree.
Outside air temperature&lt;10.0.degree.
The range of the output value (revolution frequency) is given as 50 Hz based on the partial specification relating to controllability, 10 Hz or less based on the partial specification relating to economy, and 30 Hz or more based on the partial specification relating to durability. FIG. 2 shows a numeric line representing the relation between these output values.
In the case where there partial specifications are conflict with each other in this way, it is impossible to select an output value satisfying all the partial specifications. When Guide 2 is applied, the partial specification relating to durability of top priority and the group of partial specifications not in conflict with the partial specification of top priority is the one for durability. The output value of 30 Hz can thus be selected.
When Guide 3 is applied, the partial specification of top priority which is in conflict with the partial specification relating to durability and highest in priority is the one relating to economy. The output value satisfying this partial specification is 10 Hz or less. The output value of 30 Hz or more based on Guide 2, which is most proximate to "10 Hz or less", is selected as an output value for the overall synthesized specification.
In the conventional method of generating a control program, an overall specification is generated by the operator after checking all the combinations of the input conditions.
In this conventional method, however, the work of eliminating the conflicts between partial specifications and determining an overall specification is required to be performed manually taking the general situation into consideration. The result is that
(1) So many steps of manual work are involved that automation is difficult and an error is liable to occur frequently.
(2) With an increase in the number of partial specifications and the types of output value for the partial specifications, the number of cases divided increases to such an extent as to pose the problem that a vast amount of input and output jobs is involved.
(3) Since the contents of cases divided are different for different combinations of partial specifications, the division into components and the reuse of a control program are difficult.
(4) In the case where the contents of the partial specifications or the order of priority between partial specifications is changed, many combinations of the input conditions divided into cases are affected, and therefore a vast amount of the labor required for integrating partial specifications virtually constitutes the resumption of the whole work.
(5) The work of implementing the integrated synthesized specification as a program is carried out for each combination of input conditions. This requires so much manual labor that a change in the contents of the partial specifications or in the order of priority among the partial specifications results in a large-scale repair of the programming work.